﻿<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.BLL%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.Utility%>
<div class="layout-cols2">
    <div class="col1">
        <div class="box" style="width:740px">
            <div class="news">
                <h1>
                    {NewsData.Title}</h1>
                <div class="times">
                    发布时间：{NewsData.UpdateTime}</div>
                <div style="padding: 10px 20px;">
                    {NewsData.Body}</div>
                <div style="width: 630px; margin: auto; background-color: #f5fbfd;">
                    <div style="padding: 10px; width: 630px; height: auto; margin: auto; border-style: solid;
                        border-color: #85c12b; border-width: 1px;">
                        <div style="width: 630px; height: 30px; background-color: #f5fbfd; margin: auto;
                            text-align: center; border-bottom-style: dashed; border-bottom-width: 1px;">
                            <table style="width: 630px; background-color: #f5fbfd; border-width: 1px; font-size: 12px;
                                line-height: 20px;">
                                <tr>
                                    <td style="width: 340px; text-align: left">
                                        <b>病友评论</b>
                                    </td>
                                    <td style="width: 340px; text-align: right">
                                        <b>已有{CommentCount}条评论</b>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <%csharp%>foreach(NewsComment item in NewsCommentList) {
                        <%/csharp%>
                        <div style="margin: auto; width: 630px; height: auto; border: 1px; background-color: #f5fbfd;">
                            <div style="margin: auto; width: 630px; height: auto; border: 1px;">
                                <div style="width: 630px; height: 20px; margin: auto; text-align: left;">
                                    <div style="width: 630px; border-width: 1px; font-size: 12px; line-height: 20px;">
                                    <%if (!string.IsNullOrEmpty(item.Alias))%>
                                     {item.Alias}
                                     <%else%> 
                                     优医网友
                                     <%/if%>
                                      &nbsp;&nbsp;{item.InsertDateTime}
                                    </div>
                                </div>
                                <div style="width: 630px; height: 20px; margin: auto; text-align: left;">
                                    <div style="width: 630px; background-color: #f5fbfd; border-width: 1px; font-size: 12px;
                                        line-height: 20px;">
                                        {item.CommentData}
                                    </div>
                                </div>
                                <div style="margin: auto; width: 630px; height: 5px; border: 1px; border-bottom-style: dashed;
                                    border-bottom-width: 1px;">
                                </div>
                            </div>
                        </div>
                        <%csharp%>}<%/csharp%>
                        <div style="width: 630px; height: 40px; margin-right: 50px; text-align: right;">
                            <div style="line-height: 20px; font-size: 12px;">
                                <b>已有{CommentCount}条评论</b>
                            </div>
                        </div>
                        <div style="width: 630px; background-color: #f5fbfd; margin: auto;">
                            <form id="formComment" method="post" action="">
                                <textarea id="textareaComment" name="textareaComment" style="width: 630px; padding: 10px; height: 50px;"></textarea>
                                <div style="line-height: 20px; font-size: 12px">
                                <%if (string.IsNullOrEmpty(UserData.UserName.ToString()))%>
                                     
                                    用户名：<input type="text" id="UserName" name="UserName" style="margin-right: 20px;" />
                                    密码：<input type="password" id="Password" name="Password" style="margin-right: 20px;" />
                                    <%else%> 
                                     <b>{UserData.UserName}</b>&nbsp;&nbsp;<input type="checkbox" id="anonymous" name="anonymous"/>
                                    匿名发言
                                     <%/if%>
                                     <input type="button" value="提交评论" style="margin-left: 20px;" onclick="Submit();" />
                                </div>
                            </form>
                        </div>
                        <div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col2">
        <%csharp%>if(NewsList.Count!=0){<%/csharp%>
        <%csharp%>
        TempUrl = "/BBS/NewsList.aspx?gid=" + GroupData.Id ;
        <%/csharp%>
        <%csharp%>TempUrl = ModuleCtrl.Header7("BBSNews","版块新闻",this.GetUrl(TempUrl),">>更多");
        <%/csharp%>
        {TempUrl}
        <div class="toptopiclist">
            <%csharp%>foreach(GroupNewsInfo item in NewsList) {
            <%/csharp%>
            <li style="margin-bottom: 5px;">
                <%csharp%>
                TempUrl = "/BBS/News.aspx?gid={GroupData.Id}&id="+item.Id;
                <%/csharp%>
                <a href="{this.GetUrl(TempUrl)}">
                    <%if item.Title.Length<=50%>{item.Title}<%else%>{item.Title.Substring(0,50)}...<%/if%></a>
                <font style="color: #666666;">({item.UpdateTime.ToString("yyyy-MM-dd")})</font>&nbsp;&nbsp;
            </li>
            <%csharp%>}<%/csharp%>
        </div>
        <%csharp%>TempUrl = ModuleCtrl.Footer("BBSNews");
        <%/csharp%>
        {TempUrl}
        <%csharp%>}<%/csharp%>
    </div>

    <script language="javascript">
    function Submit()
    {
        document.getElementById("formComment").submit();
    }
    </script>

</div>
<%template _footer%>
